package com.hhsjtest.alipaydragview.impl;

import android.content.Context;

import com.hhsjtest.appdraglayout.alipay.AlipayDragFrameLayout;

/**
 * @author Shaohua
 * @date [2021:01:18 11:20]
 * @Discription:
 */
public class DefaultDragItemFactory implements
        AlipayDragFrameLayout.DragItemFactory<ItemInfo, DefaultDragItemView> {

    private Context context;

    public DefaultDragItemFactory(Context context) {
        this.context = context;
    }

    @Override
    public DefaultDragItemView createDragItem(ItemInfo dragInfo) {
        DefaultDragItemView itemView = new DefaultDragItemView(context);
        itemView.updateData(dragInfo);
        return itemView;
    }
}
